package com.slz3.business.module.goodsManagement.gooBaseGoodsSpecification.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.goodsManagement.gooBaseGoodsSpecification.domain.GooBaseGoodsSpecification;
import com.slz3.business.module.goodsManagement.gooBaseGoodsSpecification.domain.GooBaseGoodsSpecificationCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

@Component
public class GooBaseGoodsSpecificationResAtomic{

    public Mono<ServerResponse> add_$GooBaseGoodsSpecificationUpdateLock(ServerRequest req, GooBaseGoodsSpecification gooBaseGoodsSpecification) {
        return GooBaseGoodsSpecificationResSafeValid.add(req, gooBaseGoodsSpecification) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsSpecificationResExecutor.add(req, gooBaseGoodsSpecification);
    }

    public Mono<ServerResponse> delete_$GooBaseGoodsSpecificationUpdateLock(ServerRequest req, GooBaseGoodsSpecificationCondition gooBaseGoodsSpecificationCondition) {
        return GooBaseGoodsSpecificationResSafeValid.delete(req, gooBaseGoodsSpecificationCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsSpecificationResExecutor.delete(req);
    }

    public Mono<ServerResponse> modify_$GooBaseGoodsSpecificationUpdateLock(ServerRequest req, GooBaseGoodsSpecification gooBaseGoodsSpecification) {
        return GooBaseGoodsSpecificationResSafeValid.modify(req, gooBaseGoodsSpecification) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsSpecificationResExecutor.modify(req, gooBaseGoodsSpecification);
    }

    public Mono<ServerResponse> info_$GooBaseGoodsSpecificationUpdateLock(ServerRequest req) {
        return GooBaseGoodsSpecificationResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsSpecificationResExecutor.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$GooBaseGoodsSpecificationUpdateLock(ServerRequest req, GooBaseGoodsSpecificationCondition gooBaseGoodsSpecificationCondition) {
        return GooBaseGoodsSpecificationResSafeValid.auditSubmit(req, gooBaseGoodsSpecificationCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsSpecificationResExecutor.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$GooBaseGoodsSpecificationUpdateLock(ServerRequest req, GooBaseGoodsSpecificationCondition gooBaseGoodsSpecificationCondition) {
        return GooBaseGoodsSpecificationResSafeValid.audit(req, gooBaseGoodsSpecificationCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsSpecificationResExecutor.audit(req);
    }

    public Mono<ServerResponse> auditReject_$GooBaseGoodsSpecificationUpdateLock(ServerRequest req, GooBaseGoodsSpecificationCondition gooBaseGoodsSpecificationCondition) {
        return GooBaseGoodsSpecificationResSafeValid.auditReject(req, gooBaseGoodsSpecificationCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsSpecificationResExecutor.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$GooBaseGoodsSpecificationUpdateLock(ServerRequest req, GooBaseGoodsSpecificationCondition gooBaseGoodsSpecificationCondition) {
        return GooBaseGoodsSpecificationResSafeValid.usingEnable(req, gooBaseGoodsSpecificationCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsSpecificationResExecutor.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$GooBaseGoodsSpecificationUpdateLock(ServerRequest req, GooBaseGoodsSpecificationCondition gooBaseGoodsSpecificationCondition) {
        return GooBaseGoodsSpecificationResSafeValid.usingDisable(req, gooBaseGoodsSpecificationCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsSpecificationResExecutor.usingDisable(req);
    }
}
